import {
	defineStore
} from 'pinia'
export const useAppInfoStore = defineStore('appInfo', {
	state: () => {
		return {
			statusbar: 0,
			navBarHeight: 0,
			screenWidth: 0,
			screenHeight: 0,
			deviceId: "",
			deviceBrand: "",
			appVersion: "",
			platform: "",
		}
	},
	actions: {
		setInfo(statusbar, navBarHeight, screenWidth, screenHeight, deviceId, deviceBrand, appVersion,
		platform) {
			this.statusbar = statusbar;
			this.navBarHeight = navBarHeight;
			this.screenWidth = screenWidth;
			this.screenHeight = screenHeight;
			this.deviceId = deviceId;
			this.deviceBrand = deviceBrand;
			this.appVersion = appVersion;
			this.platform = platform;
		},
		getInfo() {
			return {
				statusbar: this.statusbar,
				navBarHeight: this.navBarHeight,
				screenWidth: this.screenWidth,
				screenHeight: this.screenHeight,
				deviceId: this.deviceId,
				deviceBrand: this.deviceBrand,
				appVersion: this.appVersion,
				platform: this.platform,
			}
		},
	}
});